<!DOCTYPE html>
<html lang="en">

<head>

    <!-- Basic -->
    <meta charset="UTF-8"/>

    <title>Table | Nadhif - Responsive Admin Template</title>

    <!-- Mobile Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

    <!-- Import google fonts -->
    <!--<link href="http://fonts.useso.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css"/>-->

    <!-- Favicon and touch icons -->
    <link rel="shortcut icon" href="__ADMIN__/assets/ico/favicon.ico" type="image/x-icon"/>
    <link rel="apple-touch-icon" href="__ADMIN__/assets/ico/apple-touch-icon.png"/>
    <link rel="apple-touch-icon" sizes="57x57" href="__ADMIN__/assets/ico/apple-touch-icon-57x57.png"/>
    <link rel="apple-touch-icon" sizes="72x72" href="__ADMIN__/assets/ico/apple-touch-icon-72x72.png"/>
    <link rel="apple-touch-icon" sizes="76x76" href="__ADMIN__/assets/ico/apple-touch-icon-76x76.png"/>
    <link rel="apple-touch-icon" sizes="114x114" href="__ADMIN__/assets/ico/apple-touch-icon-114x114.png"/>
    <link rel="apple-touch-icon" sizes="120x120" href="__ADMIN__/assets/ico/apple-touch-icon-120x120.png"/>
    <link rel="apple-touch-icon" sizes="144x144" href="__ADMIN__/assets/ico/apple-touch-icon-144x144.png"/>
    <link rel="apple-touch-icon" sizes="152x152" href="__ADMIN__/assets/ico/apple-touch-icon-152x152.png"/>

    <!-- start: CSS file-->

    <!-- Vendor CSS-->
    <link href="__ADMIN__/assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="__ADMIN__/assets/vendor/skycons/css/skycons.css" rel="stylesheet"/>
    <link href="__ADMIN__/assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>

    <!-- Plugins CSS-->
    <link href="__ADMIN__/assets/plugins/bootkit/css/bootkit.css" rel="stylesheet"/>
    <link href="__ADMIN__/assets/plugins/fullcalendar/css/fullcalendar.css" rel="stylesheet"/>
    <link href="__ADMIN__/assets/plugins/jquery-ui/css/jquery-ui-1.10.4.min.css" rel="stylesheet"/>
    <link href="__ADMIN__/assets/css/toastr.min.css" rel="stylesheet" />
    <!-- Theme CSS -->
    <link href="__ADMIN__/assets/css/jquery.mmenu.css" rel="stylesheet"/>

    <!-- Page CSS -->
    <link href="__ADMIN__/assets/css/style.css" rel="stylesheet"/>
    <link href="__ADMIN__/assets/css/add-ons.min.css" rel="stylesheet"/>

    <!-- end: CSS file-->


    <!-- Head Libs -->
    <script src="__ADMIN__/assets/plugins/modernizr/js/modernizr.js"></script>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <!--<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>-->
    <!--<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>-->
    <!--<![endif]&ndash;&gt;-->

</head>

<body>

<!-- Start: Header -->
{include file="public/header"}
<!-- End: Header -->

<!-- Start: Content -->
<div class="container-fluid content">

    <div class="row">

        <!-- Sidebar -->
        {include file="public/sidebar"}
        <!-- End Sidebar -->

        <!-- Main Page -->
        <div class="main sidebar-minified">
            <!-- Page Header -->
            <div class="page-header">
                <div class="pull-left">
                    <ol class="breadcrumb visible-sm visible-md visible-lg">
                        <li><a href="{:url('/index')}"><i class="icon fa fa-home"></i>后台主页</a></li>
                        <li><a href="{:url('/poundage')}"><i class="icon fa fa-rmb (alias)"></i>交易参数</a></li>

                    </ol>
                </div>
                <div class="pull-right">
                    <h2>参数列表</h2>
                </div>
            </div>
            <!-- End Page Header -->

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel">
                        <div class="panel-heading bk-bg-primary">
                            <h6><i class="fa fa-rmb (alias) red"></i><span class="break">参数列表</span></h6>
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <form action="{:url('conf/create')}" method="get">
                                    <table class="table table-striped table-bordered bootstrap-datatable datatable">
                                        <thead>
                                        <tr>
                                            <th style="text-align: center">项目名称</th>
                                            <th style="text-align: center">金额比率(*仅支持<1的四位小数)</th>
                                            <th style="text-align: center">操作</th>
                                        </tr>
                                        </thead>

                                        <tbody>
                                        {volist name="poundagelist" id="data"}
                                        <tr>
                                            <td style="text-align: center" data-name="data-name-{$data.id}" class="name">{$data.cnname}</td>
                                            <td style="text-align: center;vertical-align: middle;">{$data.money}</td>
                                            <td style="text-align: center;vertical-align: middle;">
                                                <button type="button" data-id={$data.id} class="btn  update-btn btn-success " data-target="#updateModal" data-toggle="modal">
                                                    <i class="fa fa-edit"></i>
                                                </button>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>

                                    </table>
                                </form>

                            </div>
                        </div>

                    </div>
                </div>
                <!--分页-->

            </div>


        </div>
        <!-- End Main Page -->




    <div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <div class="panel-heading bk-bg-primary">
                        <h6 name="edit_top"><i class="fa fa-rmb (alias) red"><span class="break">比例修改</span></i></h6>
                    </div>
                </div>
                <div class="modal-body">
                    
                    <form action=""  id="updateform" method="post" class=" form-horizontal ">
                        <input type="hidden" name="_method" value="PUT">

                        <div class="form-group">
                            <label class="col-md-3 control-label updatename"></label>
                            <div class="col-md-9">
                                <input name="money" class="form-control" type="text" value="">
                
                            </div>
                        </div>

                
                        <br>
                        <div class="modal-footer" style="text-align: center">
                
                            <input type="submit" class="btn-sm  btn-primary" value="保存">
                        </div>
                        
                    </form>
                    </div>
            </div>
        </div>
    </div>
</div><!--/container-->

<div class="clearfix"></div>


<!-- start: JavaScript-->

<!-- Vendor JS-->
<script src="__ADMIN__/assets/vendor/js/jquery.min.js"></script>
<script src="__ADMIN__/assets/vendor/js/jquery-2.1.1.min.js"></script>
<script src="__ADMIN__/assets/vendor/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__ADMIN__/assets/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="__ADMIN__/assets/vendor/skycons/js/skycons.js"></script>

<!-- Plugins JS-->
<script src="__ADMIN__/assets/plugins/jquery-ui/js/jquery-ui-1.10.4.min.js"></script>
<script src="__ADMIN__/assets/plugins/moment/js/moment.min.js"></script>
<script src="__ADMIN__/assets/plugins/fullcalendar/js/fullcalendar.min.js"></script>

<!-- Theme JS -->
<script src="__ADMIN__/assets/js/jquery.mmenu.min.js"></script>
<script src="__ADMIN__/assets/js/core.min.js"></script>

<!-- Pages JS -->
<script src="__ADMIN__/assets/js/pages/table.js"></script>

<!-- end: JavaScript-->
<script src="__ADMIN__/assets/js/toastr.min.js"></script>
<script>



        $('.update-btn').click(function(){
            var po_id = $(this).attr('data-id');
            var po_name = $("td[data-name='data-name-"+po_id+"']").html();
            // console.log('po_id' + po_id);
            // console.log('po_name' + po_name);
            $('label').html(po_name);
            $('form#updateform').attr('action', '/poundage/' + po_id);
        });


    
</script>
</body>

</html>